package com.aspose.cells;

class zbxt extends zcdb {
   zbxt(PivotTable var1, String var2) throws Exception {
      this.d = 280;
      int var3 = 32;
      byte[] var10000 = new byte[]{-1, -1, -1, -1};
      String var5 = var1.b.g;
      if (var5 != null) {
         var3 += var5.length() * 2 + 4;
      }

      var5 = var1.b.h;
      if (var5 != null) {
         var3 += var5.length() * 2 + 4;
      }

      var5 = var1.getErrorString();
      if (var5 != null && var5.length() != 0) {
         var3 += var5.length() * 2 + 4;
      }

      var5 = var1.getNullString();
      if (var5 != null && var5.length() != 0) {
         var3 += var5.length() * 2 + 4;
      }

      var5 = var1.getPivotTableStyleName();
      if (var5 != null) {
         var3 += var5.length() * 2 + 4;
      }

      var5 = var1.getTag();
      if (var5 != null) {
         var3 += var5.length() * 2 + 4;
      }

      var5 = var1.getColumnHeaderCaption();
      if (var5 != null) {
         var3 += var5.length() * 2 + 4;
      }

      var5 = var1.getRowHeaderCaption();
      if (var5 != null) {
         var3 += var5.length() * 2 + 4;
      }

      this.c = new byte[var3];
      int var6 = 0;
      int var7 = 0;
      int var8 = 0;
      if (var1.getDisplayImmediateItems()) {
         var6 |= 256;
      }

      if (var1.O) {
         var6 |= 512;
      }

      if (!var1.getEnableFieldList()) {
         var6 |= 1024;
      }

      if (!var1.getShowDrill()) {
         var6 |= 1048576;
      }

      if (var1.getPrintDrill()) {
         var6 |= 2097152;
      }

      if (var1.getShowMemberPropertyTips()) {
         var6 |= 4194304;
      }

      if (!var1.getShowDataTips()) {
         var6 |= 8388608;
      }

      byte var9 = 0;
      byte var18 = (byte)(var9 | (byte)var1.C);
      if (!var1.getShowRowHeaderCaption()) {
         var18 = (byte)(var18 | 128);
      }

      if (var1.getShowEmptyRow()) {
         var7 |= 4;
      }

      if (var1.getShowEmptyCol()) {
         var7 |= 8;
      }

      if (var1.getEnableWizard()) {
         var7 |= 16;
      }

      if (var1.getEnableDrilldown()) {
         var7 |= 32;
      }

      if (var1.getEnableFieldDialog()) {
         var7 |= 64;
      }

      if (var1.getPreserveFormatting()) {
         var7 |= 128;
      }

      if (var1.isAutoFormat()) {
         var7 |= 256;
      }

      if (var1.getDisplayErrorString()) {
         var7 |= 512;
      }

      if (var1.getDisplayNullString()) {
         var7 |= 1024;
      }

      if (var1.getPageFieldOrder() == 1) {
         var7 |= 2048;
      }

      if (var1.getSubtotalHiddenPageItems()) {
         var7 |= 4096;
      }

      if (var1.getColumnGrand()) {
         var7 |= 8192;
      }

      if (var1.getRowGrand()) {
         var7 |= 16384;
      }

      if (var1.getPrintTitles()) {
         var7 |= 32768;
      }

      if (var1.getItemPrintTitles()) {
         var7 |= 131072;
      }

      if (var1.getMergeLabels()) {
         var7 |= 262144;
      }

      boolean var10 = ((var7 & 983040) >> 16 & 8) != 0;
      boolean var11 = ((var7 & 15728640) >> 20 & 1) != 0;
      boolean var12 = ((var7 & 15728640) >> 20 & 2) != 0;
      boolean var13 = ((var7 & 15728640) >> 20 & 4) != 0;
      boolean var14 = ((var7 & 15728640) >> 20 & 8) != 0;
      boolean var15 = (((long)var7 & 4026531840L) >> 28 & 4L) != 0L;
      if (var1.b.h != null) {
         var7 |= 524288;
      }

      if (var1.getTag() != null) {
         var7 |= 1073741824;
      }

      if (var1.getPivotTableStyleName() != null) {
         var7 |= 4194304;
      }

      if (var1.u) {
         var8 |= 1;
      }

      if (var1.v) {
         var8 |= 8;
      }

      if (var1.w) {
         var8 |= 2;
      }

      if (var1.x) {
         var8 |= 4;
      }

      if (!var1.t) {
         var8 |= 16;
      }

      if (!var1.isMultipleFieldFilters()) {
         var8 |= 512;
      }

      if (var1.getErrorString() == null || var1.getErrorString().length() == 0) {
         var8 |= 64;
      }

      if (var1.getNullString() == null || var1.getNullString().length() == 0) {
         var8 |= 128;
      }

      if (var1.getRowHeaderCaption() != null && var1.getRowHeaderCaption().length() != 0) {
         var8 |= 1024;
      }

      if (var1.getColumnHeaderCaption() != null && var1.getColumnHeaderCaption().length() != 0) {
         var8 |= 2048;
      }

      if (var1.getFieldListSortAscending()) {
         var8 |= 4096;
      }

      if (!var1.getCustomListSort()) {
         var8 |= 16384;
      }

      var6 |= 16384;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var6), 0, this.c, 0, 4);
      this.c[0] = 4;
      this.c[3] = var18;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var7), 0, this.c, 4, 4);
      this.c[6] = (byte)(this.c[6] | 1);
      int var16 = zase.X(var1.getAutoFormatType());
      if (var16 == 4117) {
         this.c[7] = (byte)(this.c[7] | 32);
      }

      System.arraycopy(com.aspose.cells.b.a.zc.a(var8), 0, this.c, 8, 4);
      if (var1.getDataField() != null) {
         if (var1.getDataField().m == 1) {
            this.c[12] = 1;
         } else if (var1.getDataField().m == 2) {
            this.c[12] = 2;
         }
      } else {
         this.c[12] = 2;
      }

      this.c[13] = (byte)var1.getPageFieldWrapCount();
      this.c[14] = (byte)var1.z;
      this.c[15] = 3;
      System.arraycopy(com.aspose.cells.b.a.zc.a((int)-1), 0, this.c, 16, 4);
      if (var16 == 4117) {
         System.arraycopy(com.aspose.cells.b.a.zc.a((int)1), 0, this.c, 20, 2);
      } else {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var16), 0, this.c, 20, 2);
      }

      this.c[8] = -33;
      System.arraycopy(com.aspose.cells.b.a.zc.a(zase.C(var2)), 0, this.c, 28, 4);
      int var17 = 32;
      var5 = var1.b.g;
      if (var5 != null) {
         var17 = zcch.a(this.c, var17, var5);
      }

      var5 = var1.b.h;
      if (var5 != null) {
         var17 = zcch.a(this.c, var17, var5);
      }

      var5 = var1.getErrorString();
      if (var5 != null && var5.length() != 0) {
         var17 = zcch.a(this.c, var17, var5);
      }

      var5 = var1.getNullString();
      if (var5 != null && var5.length() != 0) {
         var17 = zcch.a(this.c, var17, var5);
      }

      var5 = var1.getPivotTableStyleName();
      if (var5 != null) {
         var17 = zcch.a(this.c, var17, var5);
      }

      var5 = var1.getTag();
      if (var5 != null) {
         var17 = zcch.a(this.c, var17, var5);
      }

      var5 = var1.getColumnHeaderCaption();
      if (var5 != null) {
         var17 = zcch.a(this.c, var17, var5);
      }

      var5 = var1.getRowHeaderCaption();
      if (var5 != null) {
         zcch.a(this.c, var17, var5);
      }

   }
}
